import { OmitPartial } from '/#/utils';
import { BasicPageParams, BasicModel, BasicFetchResult } from '/@/api/model/baseModel';

export interface BasicMessageModel {
         /**
         * 消息id
         */
     id: number;
         /**
         * 发送人id
         */
     senderBy: number;
         /**
         * 发送人姓名
         */
     senderByName: string;
         /**
         * 接受人id
         */
     receiverBy: number;
         /**
         * 接收人姓名
         */
     receiverByName: string;
         /**
         * 是否处理
         */
     isHandle: boolean;
}
/**
* 后台开启id序列化时id类型为字符串，如果没开启id类型就是number,此处用一个动态类型代替，方便生成；
*/
export type MessageIDType = BasicMessageModel['id'];

export type UpdateMessageParams = OmitPartial<BasicMessageModel, 'id'>;

export type MessageParams = Partial<BasicMessageModel>;

export type MessagePageSearchParams = BasicPageParams & MessageParams;

export type MessageListSearchParams = MessageParams;

export type MessageModel = BasicModel & BasicMessageModel;

export type MessagePageListGetResultModel = BasicFetchResult<MessageModel>;

export type MessageListGetResultModel = MessageModel[];
